<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="organizations/organization[0]/sequence_no" value="1" >
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >
<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo" cellspacing="1" style="table-layout:fixed;">
	<col width="15%;">
	<col width="20%;">
	<col width="10%;">
	<col width="10%;">
	<col width="15%;">
	<col width="10%;">
	<col width="20%;">
	<tr> 
		<td   colspan="7" class="t_bar2">候选人基本情况</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>姓名：</td>
		<td  >
			<span name="proposal/personname"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right"><span class="color_red"></span>性 别：</td>
		<td  >
			<c:set var="genderValue"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/gender_value" /></c:set>
			<c:if test="${genderValue=='M'}">
				<span name="proposal/gender">男</span>
			</c:if>
			<c:if test="${genderValue=='F'}">
				<span name="proposal/gender">女</span>
			</c:if>
		</td>
		<td  align="right"><span class="color_red"></span>民 族：</td>
		<td  >
		<span name="proposal/ethnicity_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/ethnicity_name" /></span>
		</td>
		<td rowspan="4" align="center" >
		<c:set var="file_code8"><x:out select="$xmlData/data/content/file_code8" /></c:set>
		<div id="uploadsuccess8">
		<c:choose>
		<c:when test="${file_code8==''}">
			<img  id="orgphotoImg" src="${param.res_app}/images/app/photo_01.jpg"  style="width:96px;height:125px"/>
 		</c:when>
		<c:otherwise>
			 <img id="orgphotoImg" src="${ctx}/file/ajax-filedownload?fileCode=<x:out select="$xmlData/data/content/file_code8" />"  style="width:130px;height:159px" />
		</c:otherwise>
		</c:choose>
		<br/>
		<a href="#" style="cursor: pointer;" onclick="cilckFile('org')" id="aaa"><span style="color: blue;">[上传照片]</span></a><BR />
		</div>
		<div id="file8" style="text-align:center">
			   <input type="hidden" name="content/file_code8" id="content_file_code8"  label="照片" class="required " value="<x:out select="$xmlData/data/content/file_code8" />" />
		</div>
		 </td>	
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>身份证号：</td>
		<td colspan="2" >
		<span name="proposal/card_code"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/card_code" /></span>
		</td>
		<td  align="right"><span class="color_red">*</span>党    派：</td>
		<td  colspan="2" >
			<input name="proposal/dangpai" label="党派" type="text" required class="input_css required "   maxlength="60" value="<x:out select="$xmlData/data/proposal/dangpai" />"/> 
		</td>
	</tr>
		<td  align="right"><span class="color_red"></span>出生日期：</td>
		<td colspan="2" >
				<span name="proposal/birthday"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/birthday" /></span>
		</td>
		<td  align="right"><span class="color_red">*</span>出 生 地：</td>
		<td  colspan="2" >
			<input name="proposal/birthaddress" label="出生地" type="text" required class="input_css required "   maxlength="60" value="<x:out select="$xmlData/data/proposal/birthaddress" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>学    历：</td>
		<td colspan="2" >
			<span name="proposal/educate_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/educate_name" /></span>
		</td>
		<td  align="right"><span class="color_red"></span>学    位：</td>
		<td  colspan="2" >
			<span name="proposal/degree_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/degree_name" /></span>
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>院   士：</td>
		<td colspan="2" >
			<span name="proposal/academician_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/academician_name" /></span>
		</td>
		<td  align="right"><span class="color_red">*</span>当选时间：</td>
		<td >
		 	<c:set var="election_date"><x:out select="$xmlData/data/proposal/election_date" /></c:set>
			<cpt:date id="election_date" name="proposal/election_date" value="${election_date}" className=" required date " label="当选时间"   size="10%;"></cpt:date> 
		</td>
		<td  align="right"><span class="color_red">*</span>从事专业：</td>
		<td  >
			<c:set var="major"><x:out select="$xmlData/data/proposal/major_work" /></c:set>
			<c:if test="${empty major }"><c:set var="major"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/major_work" /></c:set></c:if>
			<input name="proposal/major_work" label="从事专业" type="text" required class="input_css required "   maxlength="20" value="${major }"/> 
			<!-- （限20个汉字） -->
		</td>
	</tr>
	<tr>
		<td align="right" rowspan="3"><span class="color_red">*</span>学科分类名称及代码：</td>
  		 <td  colspan="2">
          	<c:set var="subject1">{'id':'<x:out select="$xmlData/data/proposal/subject1_code" />','name':'<x:out select="$xmlData/data/proposal/subject1_name" />'}</c:set>
          	<cpt:tree key="medically2" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject1}"  label="学科分类名称及代码"
          		id="subject1" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
	        <input id="subject1_code" type="hidden" name="proposal/subject1_code" class=" " label="学科分类名称及代码" value="<x:out select="$xmlData/data/proposal/subject1_code" />"/>
            <input id="subject1_name" type="hidden" name="proposal/subject1_name"  value="<x:out select="$xmlData/data/proposal/subject1_name" />"/>
  	 	 </td>
  	 	 <td  align="right"><span class="color_red"></span>职务：</td>
		 <td  colspan="4" >
			<span name="proposal/position"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" /></span>
		 </td>
	</tr>
	<tr >
  		 <td  colspan="2" class="li_2">
          	<c:set var="subject2">{'id':'<x:out select="$xmlData/data/proposal/subject2_code" />','name':'<x:out select="$xmlData/data/proposal/subject2_name" />'}</c:set>
          	<cpt:tree key="medically2" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject2}"  label="学科名称"
          		id="subject2" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
	        <input id="subject2_code" type="hidden" name="proposal/subject2_code" class=" " label="学科名称" value="<x:out select="$xmlData/data/proposal/subject2_code" />"/>
            <input id="subject2_name" type="hidden" name="proposal/subject2_name"  value="<x:out select="$xmlData/data/proposal/subject2_name" />"/>
  	 	 </td>
  	 	 <td  align="right"><span class="color_red"></span>职称：</td>
		 <td  colspan="4" >
			<span name="proposal/prof_title_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/prof_title_name" /></span>
		 </td>
	</tr>
	<tr>
  		 <td  colspan="2">
          	<c:set var="subject3">{'id':'<x:out select="$xmlData/data/proposal/subject3_code" />','name':'<x:out select="$xmlData/data/proposal/subject3_name" />'}</c:set>
          	<cpt:tree key="medically2" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${subject3}"  label="学科名称"
          		id="subject3" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
	        <input id="subject3_code" type="hidden" name="proposal/subject3_code" class=" " label="学科名称" value="<x:out select="$xmlData/data/proposal/subject3_code" />"/>
            <input id="subject3_name" type="hidden" name="proposal/subject3_name"  value="<x:out select="$xmlData/data/proposal/subject3_name" />"/>
  	 	 </td>
  	 	 <td  align="right"><span class="color_red"></span>电子邮箱：</td>
		 <td  colspan="4" >
			<span name="proposal/email"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		 </td>
	</tr>
	<%-- <tr>
		<td  align="right"><span class="color_red">*</span>职称/职务：</td>
		<td colspan="2" >
		<c:set var="position"><x:out select="$xmlData/data/proposal/position" /></c:set>
		<c:if test="${empty position }"><c:set var="position"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/prof_title_name" />/<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" /></c:set></c:if>
		
			<input name="proposal/position" label="职称/职务" type="text" required class="input_css required "   maxlength="20" value="${position }"/> 
			（限20个汉字）
		</td>
	</tr> --%>
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo2" cellspacing="1" style="table-layout:fixed;">
	<col width="5%;">
	<col width="10%;">
	<col width="40%;">
	<col width="10%;">
	<col width="35%;">
	<tr>
		<td  align="center" rowspan="4">工<br/><br/>作<br/><br/>单<br/><br/>位</td>
		<td  align="right" >名称：</td>
		<td   colspan="3">
			<span name="organization/orgname"> 
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" />
			</span>
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>通讯地址：</td>
		<td  colspan="3">
			<span name="organization/address"> 
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/address" />
			</span>
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td >
			<c:set var="orgtel"><x:out select="$xmlData/data/proposal/org_tel" /></c:set>
			<c:if test="${empty orgtel }"><c:set var="orgtel"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_tel" /></c:set></c:if>
			<input name="proposal/org_tel" label="工作单位-->联系电话" type="text" required class="input_css required "   maxlength="60" value="${orgtel }"/> 
		</td>
		<td  align="right"><span class="color_red"></span>传    真：</td>
		<td >
			<span name="organization/prp_fax"> 
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/fax" />
			</span>
		</td>
	</tr>
	<tr>
		<td  align="right" >电子邮箱：</td>
			<td>
			<span name="organization/prp_email"> 
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/email" />
			</span>
		</td>
		<td  align="right"><span class="color_red"></span>邮政编码：</td>
		<td >
			<span name="organization/zip_code"> 
				<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/zip_code" />
			</span>
		</td>
	</tr>
	<tr>
		<td  align="center" rowspan="3">单<br/>位<br/>联<br/>系<br/>人</td>
		<td  align="right"><span class="color_red">*</span>姓名：</td>
		<td >
			<input name="proposal/contact_psn" label="单位联系人姓名" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/contact_psn" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td >
			<input name="proposal/contact_email" label="单位联系人电子邮箱" type="text" required class="input_css required email"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_email" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td >
			<input name="proposal/contact_phone" label="单位联系人联系电话" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/contact_phone" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>手机：</td>
		<td >
			<input name="proposal/contact_mobile" label="单位联系人手机" type="text" required class="input_css required mobile"   maxlength="11" value="<x:out select="$xmlData/data/proposal/contact_mobile" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>传真：</td>
		<td colspan="3">
			<input name="proposal/contact_fax" label="单位联系人传真" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/contact_fax" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="center" rowspan="2">住<br/><br/>宅</td>
		<td  align="right">通讯地址：</td>
		<td >
			<input name="proposal/home_address" label="住宅通讯地址" type="text" required class="input_css "   maxlength="40" value="<x:out select="$xmlData/data/proposal/home_address" />"/> 
		</td>
		<td  align="right"><span class="color_red"></span>邮政编码：</td>
		<td >
			<input name="proposal/home_zipcode" label="住宅邮政编码" type="text" required class="input_css "   maxlength="6" value="<x:out select="$xmlData/data/proposal/home_zipcode" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red"></span>联系电话：</td>
		<td >
			<input name="proposal/home_tel" label="住宅联系电话" type="text" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/proposal/home_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red"></span>传    真：</td>
		<td >
			<input name="proposal/home_fax" label="住宅传真" type="text" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/proposal/home_fax" />"/> 
		</td>
	</tr>
	<%-- <tr>
		<td align="right" colspan="2"><span class="color_red">*</span>归口管理部门：</td>
		<td colspan="3">
		<c:set var="recomend_org">
		{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />',
		'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'
		}					
		</c:set> <cpt:tree id="recomend_org" key="recommended"
				cacheable="false" className="hn_iuput_kuang required selectWidth3"
				readonly="true" value="${recomend_org}" label="归口管理部门"
				 shieldPattern="0"
				onClick="initTreeValue2_qhh">
			</cpt:tree> <input type="hidden" name="proposal/recomend_org_value"
			value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" />
			<input type="hidden" name="proposal/recomend_org_name"
			value="<x:out select="$xmlData/data/proposal/recomend_org_name" />" />
		</td>
	</tr> --%>
	<tr >
		<td colspan="2" align="right" style="border-bottom:0px;"><span class="color_red">*</span>推荐单位（或专家）：</td>
		<td  style="border-bottom:0px;">
			<c:set var="recommend_type_value"><x:out select="$xmlData/data/proposal/recommend_type_value" /></c:set>
			<cpt:select id="recommend_type"  key="recommend_type"  value="${recommend_type_value}" onChange="initControlValue(this.id);setRecommend();" ></cpt:select>
			<input type="hidden" id="recommend_type_value" name="proposal/recommend_type_value" class="required" value="${recommend_type_value}" label="推荐单位（或专家）">
			<input type="hidden" name="proposal/recommend_type_name" value="<x:out select="$xmlData/data/proposal/recommend_type_name" />">
		</td>
		<td align="right" style="border-bottom:0px;"><span class="color_red">*</span>推荐日期：</td>
		<td colspan="2">
		 	<c:set var="recommend_date"><x:out select="$xmlData/data/proposal/recommend_date" /></c:set>
			<cpt:date id="recommend_date" name="proposal/recommend_date" value="${recommend_date}" className=" required date " label="推荐日期" ></cpt:date> 
	   </td>
	</tr>
	</table>
	<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo3" cellspacing="1" style="table-layout:fixed;">
		<col width="5%;">
		<col width="10%;">
		<col width="40%;">
		<col width="10%;">
		<col width="35%;">
	<tr>
		<td align="right" colspan="2"><span class="color_red">*</span>推荐单位：</td>
		<td colspan="4">
		<c:set var="recomend_org">
		{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />',
		'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'
		}					
		</c:set> <cpt:tree id="recomend_org" key="recommended"
				cacheable="false" className="hn_iuput_kuang required selectWidth3"
				readonly="true" value="${recomend_org}" label="推荐单位"
				showPattern="all" shieldPattern="0"
				onClick="initTreeValue2_qhh">
			</cpt:tree> <input type="hidden" name="proposal/recomend_org_value"
			value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" />
			<input type="hidden" name="proposal/recomend_org_name"
			value="<x:out select="$xmlData/data/proposal/recomend_org_name" />" />
		</td>
	</tr>
	<tr>
		<td  align="center" rowspan="3">推<br/>荐<br/>单<br/>位<br/>联<br/>系<br/>人</td>
		<td  align="right"><span class="color_red">*</span>姓名：</td>
		<td >
			<input name="proposal/tjcontact_psn"  label="推荐单位联系人姓名" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/tjcontact_psn" />"/> 
		</td>
		<td  align="right"><span class="color_red"></span><span class="color_red">*</span>电子邮箱：</td>
		<td >
			<input name="proposal/tjcontact_email" label="推荐单位联系人电子邮箱" type="text" required class="input_css required email"   maxlength="50" value="<x:out select="$xmlData/data/proposal/tjcontact_email" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td >
			<input name="proposal/tjcontact_phone"  label="推荐单位联系人联系电话" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/tjcontact_phone" />"/> 
		</td>
		<td  align="right"><span class="color_red"></span><span class="color_red">*</span>手机：</td>
		<td >
			<input name="proposal/tjcontact_mobile" label="推荐单位联系人手机" type="text" required class="input_css required mobile"   maxlength="11" value="<x:out select="$xmlData/data/proposal/tjcontact_mobile" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>传真：</td>
		<td colspan="3">
			<input name="proposal/tjcontact_fax"  label="推荐单位联系人传真" type="text" required class="input_css required"   maxlength="40" value="<x:out select="$xmlData/data/proposal/tjcontact_fax" />"/> 
		</td>
	</tr>
	</table>
	<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo4" cellspacing="1" style="table-layout:fixed;">
		<col width="5%;">
		<col width="10%;">
		<col width="40%;">
		<col width="10%;">
		<col width="35%;">
	<tr>
		<td colspan="5">
			<span class="color_red">*</span>受教育情况（限300字）：<br/>
			<textarea rows="8" style="width: 98%;" name='proposal/goal/summary1' class="input_textarea required maxlength:300"   label="受教育情况"><x:out select="$xmlData/data/proposal/goal/summary1"/></textarea>
	       <input type='hidden' name='proposal/goal/summary1_hidden' id='proposal/goal/summary1_hidden' value=''>
		</td>
	</tr>
</table>

<script type="text/javascript">

$(function(){
	setRecommend();
});

function setRecommend(){
	var recommend_type = $("#recommend_type_value").val();
	if(recommend_type == '01'){
		$("#tab10").hide();
		$("input[name='content/content[07]/file_code']").val("");
		$("#fileNameHidqhh2").parent().parent().hide();
		$("#basicInfo3").show();
		$("#recomend_org").addClass("required");
	}else{
		$("#tab10").show();
		$("#basicInfo3").hide();
		$("input[name='proposal/recomend_org_value']").val("");
		$("input[name='proposal/recomend_org_name']").val("");
		$("#recomend_org").val("");
		$("#recomend_org").removeClass("required");
	}
}

function cilckFile(flag){
	var fileCode = $('#content_file_code8').val();
	if(fileCode!=""){
		tb_show("上传照片", "<c:out value="${ctx}"/>/proposal/edit/dialog/updatePhoto?fileCode="+fileCode+"&flag="+flag+"&TB_iframe=true&height=250&width=530", false);
	}else{
		tb_show("上传照片", "<c:out value="${ctx}"/>/proposal/edit/dialog/updatePhoto?flag="+flag+"&TB_iframe=true&height=250&width=530", false);
	}
}

function initTreeValue2_qhh(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.isParent)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);
	}

//显示全名称路径
function buildName(treeNode, params){
	var str = treeNode.name;
	var obj = treeNode.parentNode;
	while(obj!=null){
		//str =obj.name+"-"+str;
		obj = obj.parentNode;
	}
	return str;
}
</script>

